
@echo off
title usmc-service

set RUNHOME=%~dp0
echo ### RUNHOME: %RUNHOME%

echo ### Starting usmc-service
rem cd /d %RUNHOME%

rem set JAVA_HOME=D:\JDK1.7\jdk\jdk\windows
set JAVA="%JAVA_HOME%\bin\java.exe"
set port=8304
set jvm_opts=-Xms50m -Xmx128m
set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n
set class_path=%RUNHOME%;%RUNHOME%usmc.jar
echo ### jvm_opts: %jvm_opts%
echo ### class_path: %class_path%

%JAVA% -classpath %class_path% %jvm_opts% com.gutetec.cms.usmc.UsmcApp server %RUNHOME%conf/usmc.yml

IF ERRORLEVEL 1 goto showerror
exit
:showerror
echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check!
echo After checking, press any key to close 
rem pause
exit